Skip to content

Conversation

@jgallagher
Copy link
Contributor

This is a followup to #9521, specifically driven by @smklein's note that the planner also accesses expunged zones, and we need to track those reasons too. Doing this work revealed one case where the planner was accessing them in a way that was going to cause problems with pruning; that's fixed by #9550, and this PR is staged on top of it.

Either::Left(editor.in_service_zones())
}
InnerSledEditor::Decommissioned(_) => {
// A decommissioned sled cannot have any in-service zones!
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I strongly suspect we could pretty significantly simplify SledEditor here by getting rid of this internal decommissioned state entirely, with some minor changes to the builder. I put this here when I first started doing the builder cleanup and didn't have a great handle on commissioned vs decommissioned sleds; I'll take a crack at this simplification soon.

for (zone, nexus) in self
.blueprint
.current_zones(BlueprintZoneDisposition::any)
.current_in_service_zones()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting that this a change which no longer considers expunged zones, but that seems fine

Base automatically changed from john/blueprint-sled-next-ip to main January 8, 2026 20:00
@jgallagher jgallagher merged commit ce35f50 into main Jan 13, 2026
16 checks passed
@jgallagher jgallagher deleted the john/planner-expunged-reason branch January 13, 2026 15:48
jgallagher added a commit that referenced this pull request Jan 13, 2026
This is the small cleanup I mentioned in
#9608 (comment).
Prior to this PR, `SledEditor` wrapped an `InnerSledEditor` enum with
active / decommissioned variants, and `SledEditor`'s methods were mostly
just passthroughs to the two inner variants, except for a handful of
methods that were only valid for commissioned sleds. After this PR,
`SledEditor` only handles active sleds, and `BlueprintBuilder` keeps a
separate set of all the configs for decommissioned sleds. Most of the
other changes to the buildprint builder were minor fallout from slight
changes (e.g., some `SledEditor` methods were fallible and now are
infallible).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants